' This class is "generated" and will be overwritten.
' Your customizations should be made in OwnerVehicleRecord.vb

Imports System.Data.SqlTypes
Imports BaseClasses
Imports BaseClasses.Data
Imports BaseClasses.Data.SqlProvider

Namespace Training1.Business

''' <summary>
''' The generated superclass for the <see cref="OwnerVehicleRecord"></see> class.
''' </summary>
''' <remarks>
''' This class is not intended to be instantiated directly.  To obtain an instance of this class, 
''' use the methods of the <see cref="OwnerVehicleTable"></see> class.
''' </remarks>
''' <seealso cref="OwnerVehicleTable"></seealso>
''' <seealso cref="OwnerVehicleRecord"></seealso>

<Serializable()> Public Class BaseOwnerVehicleRecord
	Inherits PrimaryKeyRecord
	

	Public Shared Shadows ReadOnly TableUtils As OwnerVehicleTable = OwnerVehicleTable.Instance

	' Constructors
 
	Protected Sub New()
		MyBase.New(TableUtils)
	End Sub

	Protected Sub New(ByVal record As PrimaryKeyRecord)
		MyBase.New(record, TableUtils)
	End Sub







#Region "Convenience methods to get/set values of fields"

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's OwnerVehicle_.OwnerId field.
	''' </summary>
	Public Function GetOwnerIdValue() As ColumnValue
		Return Me.GetValue(TableUtils.OwnerIdColumn)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's OwnerVehicle_.OwnerId field.
	''' </summary>
	Public Function GetOwnerIdFieldValue() As Int32
		Return CType(Me.GetValue(TableUtils.OwnerIdColumn).ToInt32(), Int32)
	End Function

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.OwnerId field.
	''' </summary>
	Public Sub SetOwnerIdFieldValue(ByVal val As ColumnValue)
		Me.SetValue(val, TableUtils.OwnerIdColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.OwnerId field.
	''' </summary>
	Public Sub SetOwnerIdFieldValue(ByVal val As String)
		Me.SetString(val, TableUtils.OwnerIdColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.OwnerId field.
	''' </summary>
	Public Sub SetOwnerIdFieldValue(ByVal val As Double)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.OwnerIdColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.OwnerId field.
	''' </summary>
	Public Sub SetOwnerIdFieldValue(ByVal val As Decimal)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.OwnerIdColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.OwnerId field.
	''' </summary>
	Public Sub SetOwnerIdFieldValue(ByVal val As Int64)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.OwnerIdColumn)
	End Sub
	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's OwnerVehicle_.VehicleTypeId field.
	''' </summary>
	Public Function GetVehicleTypeIdValue() As ColumnValue
		Return Me.GetValue(TableUtils.VehicleTypeIdColumn)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's OwnerVehicle_.VehicleTypeId field.
	''' </summary>
	Public Function GetVehicleTypeIdFieldValue() As Int32
		Return CType(Me.GetValue(TableUtils.VehicleTypeIdColumn).ToInt32(), Int32)
	End Function

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.VehicleTypeId field.
	''' </summary>
	Public Sub SetVehicleTypeIdFieldValue(ByVal val As ColumnValue)
		Me.SetValue(val, TableUtils.VehicleTypeIdColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.VehicleTypeId field.
	''' </summary>
	Public Sub SetVehicleTypeIdFieldValue(ByVal val As String)
		Me.SetString(val, TableUtils.VehicleTypeIdColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.VehicleTypeId field.
	''' </summary>
	Public Sub SetVehicleTypeIdFieldValue(ByVal val As Double)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.VehicleTypeIdColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.VehicleTypeId field.
	''' </summary>
	Public Sub SetVehicleTypeIdFieldValue(ByVal val As Decimal)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.VehicleTypeIdColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's OwnerVehicle_.VehicleTypeId field.
	''' </summary>
	Public Sub SetVehicleTypeIdFieldValue(ByVal val As Int64)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.VehicleTypeIdColumn)
	End Sub


#End Region

#Region "Convenience methods to get field names"

	''' <summary>
	''' This is a convenience property that provides direct access to the value of the record's OwnerVehicle_.OwnerId field.
	''' </summary>
	Public Property OwnerId() As Int32
		Get 
			Return CType(Me.GetValue(TableUtils.OwnerIdColumn).ToInt32(), Int32)
		End Get
		Set (ByVal val As Int32) 
			Dim colValue As ColumnValue = New ColumnValue(val)
			Me.SetValue(colValue, TableUtils.OwnerIdColumn)
		End Set
	End Property


	''' <summary>
	''' This is a convenience method that can be used to determine that the column is set.
	''' </summary>
	Public ReadOnly Property OwnerIdSpecified() As Boolean
        Get
            Dim val As ColumnValue = Me.GetValue(TableUtils.OwnerIdColumn)
            If val Is Nothing OrElse val.IsNull Then
                Return False
            End If
            Return True
        End Get
    End Property

	''' <summary>
	''' This is a convenience method that can be used to get the default value of a column.
	''' </summary>
    Public ReadOnly Property OwnerIdDefault() As String
        Get
            Return TableUtils.OwnerIdColumn.DefaultValue
        End Get
    End Property

	''' <summary>
	''' This is a convenience property that provides direct access to the value of the record's OwnerVehicle_.VehicleTypeId field.
	''' </summary>
	Public Property VehicleTypeId() As Int32
		Get 
			Return CType(Me.GetValue(TableUtils.VehicleTypeIdColumn).ToInt32(), Int32)
		End Get
		Set (ByVal val As Int32) 
			Dim colValue As ColumnValue = New ColumnValue(val)
			Me.SetValue(colValue, TableUtils.VehicleTypeIdColumn)
		End Set
	End Property


	''' <summary>
	''' This is a convenience method that can be used to determine that the column is set.
	''' </summary>
	Public ReadOnly Property VehicleTypeIdSpecified() As Boolean
        Get
            Dim val As ColumnValue = Me.GetValue(TableUtils.VehicleTypeIdColumn)
            If val Is Nothing OrElse val.IsNull Then
                Return False
            End If
            Return True
        End Get
    End Property

	''' <summary>
	''' This is a convenience method that can be used to get the default value of a column.
	''' </summary>
    Public ReadOnly Property VehicleTypeIdDefault() As String
        Get
            Return TableUtils.VehicleTypeIdColumn.DefaultValue
        End Get
    End Property



#End Region

End Class
End Namespace
